#ifndef _TAIIC_MFCC_V3_H
#define _TAIIC_MFCC_V3_H

#include <Eigen/Dense>
#include <../taiic_uart/taiic_uart_sum.h>
using namespace Eigen;

//这两个宏定义用于判断声学所的ASR算法还是自研的ASR算法
// #define TAIIC_ASR 1 //启用自研的ASR算法参数
#define ACOUSTICS_ASR 1 //启用声学所的ASR算法参数

#if TAIIC_ASR
const int sampleRate = 16000;
const int fftSize = 1024;
const int frameShift = 556;
const int numFrames = 48;  
const int num_mfcc_coef = 64;
#elif ACOUSTICS_ASR
const int sampleRate = 16000;
const int fftSize = 480;
const int frameShift = 160;
const int numFrames = 270;
const int num_mfcc_coef = 30;
#endif

//声学所算法模型适配参数
#define ASR_BATCH_N 1
#define ASR_FRAMES_H numFrames
#define ASR_MFCC_W num_mfcc_coef
#define ASR_CHANNEL_C 1


static VectorXd audioData(PCM_SIZE_SOC/2);
static MatrixXd mfcc_feat_u8(numFrames, num_mfcc_coef);

VectorXd loadAudioData(const char *filename);
void extract_mfcc(const VectorXd& audioD, MatrixXd& out);











#endif 